<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    .box{width: 300px;height: 300px;background: red;}
  </style>
</head>
<body>
  <div class="box"></div>
</body>
<script>
  var box = document.querySelector(".box")

  box.onmousedown = function(abc){
    // console.log( abc );
    // console.log( window.event );

    // if(abc){
    //   console.log( abc )
    // }else{
    //   console.log( window.event );
    // }

    // 兼容处理
    var e = abc || window.event;

    console.log(e);
  }


</script>
</html>